#!/usr/bin/perl -w
use strict;
use File::Basename;

my $arg = join(" ", @ARGV);

my $dirname  = dirname($0);

opendir(DIR,$dirname)||die "can not open $dirname $!";
foreach my $f (readdir DIR){
  if ( -d "$dirname/$f" && $f !~ /^\./) {
     my $cmd = "cd $dirname/$f; $arg $f";
	 system("$arg -f $dirname/$f/pom.xml");
	 print "$cmd $dirname/$f\n";
  }
}
closedir DIR;
